<?php

namespace app\common\exception;

class Client extends App
{
    protected $httpCode = 400;
    public function __construct(int $errorCode,string $message, array $data = [])
    {
        $this->clientMessage = $message;
        $this->errorCode = $errorCode;
        parent::__construct(json_encode([
            'errorCode' => $errorCode,
            'message' => $message,
            'data' => $data
        ]));
    }

    // 关闭日志记录
    public function dontReport(): bool
    {
        return true;
    }
}